// 版权归 瞄你个汪 所有。使用本代码应遵守相关法律法规和Apache 2.0开源许可要求。
package top.geeke.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.ibatis.type.JdbcType;
import top.geeke.entity.base.EntityBaseId;
import top.geeke.toolkit.supertable.annotation.SuperColumn;
import top.geeke.toolkit.supertable.annotation.SuperTable;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 系统差异日志表
 * </p>
 * @author 瞄你个汪
 * @since 2024-05-01 12:00:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_log_diff")
@SuperTable(value = "系统差异日志表", isSystem = true)
public class SysLogDiff extends EntityBaseId implements Serializable {
    private static final long serialVersionUID = 1L;

    @SuperColumn(value = "操作前记录", columType = JdbcType.LONGVARCHAR, nullable = true)
    private String beforeData;

    @SuperColumn(value = "操作后记录", columType = JdbcType.LONGVARCHAR, nullable = true)
    private String afterData;

    @SuperColumn(value = "SQL", columType = JdbcType.LONGVARCHAR, nullable = true)
    private String Sql;

    @SuperColumn(value = "参数", columType = JdbcType.LONGVARCHAR, nullable = true)
    private String parameters;

    @SuperColumn(value = "差异操作", columType = JdbcType.LONGVARCHAR, nullable = true)
    private String diffType;

    @SuperColumn(value = "操作耗时", nullable = true)
    private Long elapsed;

    @JsonIgnore
    @JsonIgnoreProperties
    @SuperColumn(value = "租户ID")
    @TableField(fill = FieldFill.INSERT)
    private Long tenantId;
}
